<?php

/**
 * Nem felhasznált shorttag-ek:
 * 
 * {LABEL-LOGINNAME}
 * {LABEL-PASSWORD}
 * 
 */

$theme->add_css("theme/default/css/login.css");

$theme->add_js("theme/default/js/login.js");

$LOGIN_TEMPLATE = "
<div class='ui-dialog ui-widget ui-widget-content ui-corner-all login-wrapper'>
	<div class='ui-dialog-titlebar ui-widget-header ui-helper-clearfix login-caption'>
		".HOTNADMIN_LNG_LOGIN."
	</div>
	<div class='ui-dialog-content ui-widget-content login-innerwrapper'>
		{INPUT-LOGINNAME}<br />
		{INPUT-PASSWORD}
	</div>
	<div class='ui-dialog-buttonpane ui-widget-content ui-helper-clearfix ui-dialog-buttonset login-submit'>
		{INPUT-SUBMIT}
	</div>
</div>
";

$formittems['INPUT-LOGINNAME']['value'] = HOTNADMIN_LNG_LOGIN_NAME;
$formittems['INPUT-LOGINNAME']['id'] = "login-name";
$formittems['INPUT-LOGINNAME']['other'] = "data-value='".HOTNADMIN_LNG_LOGIN_NAME."'";

$formittems['INPUT-PASSWORD']['value'] = HOTNADMIN_LNG_LOGIN_PASSWORD;
$formittems['INPUT-PASSWORD']['id'] = "login-password";
$formittems['INPUT-PASSWORD']['other'] = "data-value='".HOTNADMIN_LNG_LOGIN_PASSWORD."'";

$theme->footer_jssrc[] = "
	$('#login-name').focus(function(){
		if ( $(this).val() == $(this).attr('data-value') ){
			$(this).val('');
		}
	});
	
	$('#login-name').focusout(function(){
		if ( $(this).val() == '' ){
			$(this).val($(this).attr('data-value'));
		}
	});
	
	$('#login-password').focus(function(){
		if ( $(this).val() == $(this).attr('data-value') ){
			$(this).val('');
		}
	});
	
	$('#login-password').focusout(function(){
		if ( $(this).val() == '' ){
			$(this).val($(this).attr('data-value'));
		}
	});
";

?>